package jtk.project4.fleet.field;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;

public class NewEquipmentSpesificationTabField extends GroupControl{
	
	private SpecificationsEngineTransmission engineTransmission;
	private SpecificationsPhysicalProperties physicalProperties;
	private SpecificationsOtherDetailsCustom otherDetailsCustom;
	
	public NewEquipmentSpesificationTabField(String bindID){
		setTitle("header.Spesification");
		setBindID(bindID);
		createFields();
		addField(createLayout());
	}

	private void createFields(){
		engineTransmission = new SpecificationsEngineTransmission("EngineTransmission");
		physicalProperties = new SpecificationsPhysicalProperties("physicalProperties");
		otherDetailsCustom = new SpecificationsOtherDetailsCustom("otherDetailsCustom");
	}
	
	private GroupControl createLayout(){
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(insideField())
		.addRow()
		.addField(otherDetailsCustom)
		;
		
		return form;
	}
	
	private GroupControl insideField(){
		GroupControl form = new GroupControl();
		form.setLayout(new FormLayout())
		.addField(physicalProperties)
		.addField(engineTransmission)
		;
		return form;
	}
}
